<template>
  <!-- 脱离文档流，数据分离处理 -->
  <view class="count-box-coupon-wrap">
    <text class="prefix"  >距结束: </text>
    <block v-if="countDown > 100 * 60 * 60 * 1000">
      <text class="time-box">
        {{ countDown | timeFilter('days') }}
      </text>
      <text class="time-split">天</text>
      <text class="time-box">
        {{ countDown | timeFilter('hours') }}
      </text>
    </block>
    <block v-else>
      <text class="time-box">
        {{ countDown | timeFilter('totalHours') }}
      </text>
    </block>
    <text class="time-split">:</text>
    <text class="time-box">
      {{ countDown | timeFilter('minutes') }}
    </text>
    <text class="time-split">:</text>
    <text class="time-box">
      {{ countDown | timeFilter('seconds') }}
    </text>
  </view>
</template>

<script>
export default {
  props: {
    countDown: {
      type: Number,
      default: 0,
    },
  },
};
</script>

<style lang="less">
.count-box-coupon-wrap {
  color: red;
  .prefix{
    margin-right: 12rpx;
    color: #333333;
  }
}
</style>
